]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Don't build input region rects on Wayland
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 25 Feb 2021 13:31:47 +0000 (10:31 -0300)
committerMarge Bot <marge-bot@gnome.org>
Tue, 2 Mar 2021 23:14:07 +0000 (23:14 +0000)
This is an X11-specific routine, and building the list of input region rects
on Wayland is a waste, since it incurs in many trampolines only to throw them
in the trash.

Don't build input region rects on Wayland. By modifying the 'wantsInputRegion'
variable, it also skips actors that only update input, which is another small
optimization for Wayland.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1678>

js/ui/layout.js

index c2c8151c100943f9fb803237528ccb8e82ac2651..bf251ba0006a464e330e10a85623700f3cc5628b 100644 (file)
@@ -959,7 +959,10 @@ var LayoutManager = GObject.registerClass({
 
         let rects = [], struts = [], i;
         let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow);
-        const wantsInputRegion = !isPopupMenuVisible && Main.modalCount === 0;
+        const wantsInputRegion =
+            !isPopupMenuVisible &&
+            Main.modalCount === 0 &&
+            !Meta.is_wayland_compositor();
 
         for (i = 0; i < this._trackedActors.length; i++) {
             let actorData = this._trackedActors[i];